This application is based on application Nos. 10-288834, 11-200249 and 11-237492 filed in Japan, the contents of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to method and apparatus of image processing, and, more specifically, to method and apparatus of image processing capable of performing gradation reducing process in which number of gradations of image data is reduced, by using threshold values.
2. Description of the Related Art
Handling of images in digital manner is currently dominant in the field of image processing. It is often the case that for displaying or outputting digital image, it becomes necessary to display gradations of the image in smaller number of gradation levels, because of restrictions imposed by characteristics of an output device and the like. From the early stages of development, various methods of digital half toning image processing such as binarization, in which gradations are reproduced solely by white and black dots as a pseudo halftone processing, has been studied.
Various methods including ordered dither method and error diffusion method, which are still utilized at present, as well as descendents of these methods have been developed and improved from 1960""s. Further, as the hardware of computation has been developed recently, a method of directly performing optimal search for pixel arrangement, such as the method of cost minimization, has been developed.
These methods of half toning have respective advantages and disadvantages in accordance with the objects of use, and therefore various problems and solutions for respective methods have been studied. For example, the ordered dither method is simple and easy to use, while reproduced image quality is not very good. Though load of computation is heavier in the error diffusion method than the dither method, image quality is better.
In the method of directly performing optimal search such as the method of cost minimization, various optimization methods such as neural network, genetic algorithm and simulated annealing are utilized. Adoption of such a method facilitates incorporation of a visual model or an output device model into the process, enlarging degree of freedom in the processing. On the other hand, as the optimal state is searched through repetitive operations, load becomes formidable.
The problems change along with the development of technology. The problem of formidable load experienced when the method of directly performing optimal search is used may be solved by the development of hardware defining the speed of calculation. From the viewpoint of promoting wide spread use of simple and high quality output devices, however, simpler calculation process is desired.
Further, there are the problem of trade off between resolution and gradation common to all the methods. This problem may possibly be solved by increased output gradation levels or improved resolution characteristic of the output device itself. It is expected, however, that there will be increased occasions where characters are processed as images, and such processing should desirably be done in the simplest manner possible.
Conventionally, methods of improving image processing have been studied, including a method in which an image region of which gradation is of importance and an image region of which resolution is of importance are determined and the method of processing is changed in accordance with the result of determination for respective regions, and a method in which a plurality of processing methods are combined. These methods are hardly said to be simple methods, as a new process of region determination, for example, must be developed and added to execute such methods. Considering balance with the hardware (output device), it is desirable that satisfactory resolution and gradation are both attained through such a method that is comparable to the error diffusion method.
FIG. 66 is a block diagram showing a configuration of a conventional image processing apparatus executing the error diffusion method.
Referring to the figure, the image processing apparatus includes: an input unit 501 receiving as an input a pixel value of one pixel of a multi-value image; a subtractor 503 subtracting diffused error from the input pixel value; an output unit 505 outputting, as a corrected pixel value, an output from subtractor 503; thresholding unit 507 performing thresholding on the output of output unit 505 to provide binary data; an output unit 509 outputting, as pixel data, the output of thresholding unit 507; a subtractor 511 subtracting the output of output unit 505 from the output of thresholding unit 507; and an error memory 513 for diffusing the output result from subtractor 511 to pixels around a pixel which is the object of processing (pixel of interest).
The image formed through error diffusion method has a particular texture. The texture is not very noticeable visually, as it has blue noise characteristic. A method of setting dither pattern to attain the blue noise characteristic in a simple manner has been studied for the dither method as well. In the error diffusion method, however, dot patterns are adaptively generated with respect to the input image, and therefore characteristic of the input image is better reflected than the dither method.
In this point, the error diffusion method is superior in image quality to dither method. The error diffusion method, however, has its particular noise. Namely, there occurs a phenomenon in which variation in texture at a region where gradation changes moderately results in an apparent border line where there is no border (texture shift), or a phenomenon in which white or black dots are tend to appear in a line at a region where degradation is close to black or white.
Various methods for improving have been developed to prevent these phenomena, including modulation of weight coefficient and threshold value for error diffusion. As to resolution, though inherent edge enhancement characteristic has been pointed out, it is not sufficient.
Further, from the nature of its algorithm, the error diffusion method functions to reproduce pixel values of the input image in averaging manner. More specifically, the method functions to reproduce local 0th order component of the image. Accordingly, the error diffusion method has been improved to enhance components of 1st and higher order.
An object of the present invention is to solve the problems of the above described methods of image processing, and to provide apparatus and method of image processing capable of improving image quality.
The above described objects can be attained by an image processing apparatus in accordance with an aspect of the present invention, converting a first image signal representing density level of each pixel in a prescribed number of gradations to a second image signal having a smaller number of gradations than the prescribed number, including a converter successively receiving as inputs first image signals of pixels, comparing density levels of respective pixels with a prescribed threshold and converting to the second image signals, and a feed back circuit based on the signal levels of the second image signals output from the converter and correcting the prescribed threshold value used in subsequent conversion of pixels.
Preferably, the feed back circuit includes control means for controlling a feed back value in the feed back circuit.
Preferably, the control means includes a feed back coefficient setter for setting a feed back coefficient.
Preferably, the feed back coefficient setter is capable of changing feed back coefficient.
Preferably, the feed back coefficient setter sets the feed back coefficient which changes in accordance with density level of each pixel converted by the converter.
Preferably, the feed back coefficient setter includes a calculating unit calculating the feed back coefficient based on a prescribed relation between the feed back coefficient and each density level of each pixel converted by the converter, and means for changing the prescribed relation used in the calculating unit.
Preferably, the first image signal has a plurality of color components, and the feed back coefficient setter sets the feedback coefficient which changes in accordance with the color component of the image signal converted by the converter.
Preferably, the feed back circuit includes a correction value memory dispersing the feed back value provided by the feed back circuit to a plurality of peripheral pixels to be converted subsequently, in accordance with weight set for each of the peripheral pixels.
Preferably, the weight of the correction value memory is variable.
Preferably, the image processing apparatus further includes a threshold value generating unit generating, as the prescribed threshold value, a value which varies for conversion of each pixel.
Preferably, the threshold value generating unit changes the prescribed threshold value in accordance with the position of the pixel to be converted.
Preferably, the threshold value generating unit changes the prescribed threshold value in accordance with density level of the pixel to be converted.
Preferably, the first image signal has a plurality of color components, and the threshold value generating unit changes said prescribed threshold value in accordance with the color component of the pixel to be converted.
Preferably, the image processing apparatus further includes a multiplier provided preceding the converter, multiplying the density level of each pixel to be converted by the converter by a prescribed coefficient.
Preferably, the prescribed coefficient is variable.
Preferably, the image processing apparatus adjusts gradation characteristic representing relation between level of the first pixel signal and level of the second image signal after conversion by varying at least one of the prescribed threshold value and the feed back coefficient.
Preferably, the image processing apparatus fixes gradation characteristics for the maximum and minimum levels of the first image signal, and adjusts gradation characteristic of an intermediate level between the maximum and minimum levels by changing at least one of the prescribed threshold value and the feed back coefficient.
Preferably, the image processing apparatus superposes a signal component not related to the first image signal to be converted, on any signal in the image processing apparatus.
Preferably, the signal component to be superposed represents a periodic pattern.
Preferably, the periodic pattern is any of a dispersed dither pattern, a concentrated dither pattern and a line pattern.
Preferably, the signal component to be superposed is random noise.
Preferably, the random noise is any of white noise, blue noise and pink noise.
Preferably, the feed back circuit feeds back difference between an inverted value of the signal level of the second image signal output from the converter and the threshold value.
The method of image processing in accordance with another aspect of the present invention for converting a first image signal representing density level of each pixel by a prescribed number of gradations to a second image signal having a smaller number of gradations than the prescribed number includes a conversion step in which the first image signals of pixels are successively input, density levels of respective pixels are compared with a prescribed threshold value and converted to the second image signals, and a feed back step in which based on the signal level of the second image signals output as a result of the conversion step and the threshold value, correcting the prescribed threshold value to be used for subsequent conversion of pixels.
Preferably, the feed back step includes a control step of controlling a feed back value in the feed back step.
Preferably, the method of image processing further includes the step of generating threshold value, generating, as the prescribed threshold value, a value which varies for conversion of each pixel.
Preferably, in the method of image processing, gradation characteristic representing relation between the level of the first image signal and the level of the second image signal after conversion is adjusted by changing at least one of the prescribed threshold value and a feed back coefficient.
Preferably, in the method of image processing, gradation characteristic for the maximum and minimum levels of the first image signal is fixed, and gradation characteristic of an intermediate level between the maximum and minimum levels is adjusted by changing at least one of the prescribed threshold value and feed back coefficient.
According to a still further aspect of the present invention, the image processing apparatus converting a first pixel signal representing density level of each pixel in a prescribed number of gradations to a second image signal of a smaller number of gradations than the prescribed number includes an assignment circuit successively receiving as inputs the first image signals of pixels and assigning to sections corresponding to the number of gradations of the second image signal; a normalizing circuit normalizing the input first image signals in the sections assigned by the assignment circuit; a comparator successively receiving as inputs the first image signals normalized by the normalizing circuit, and comparing signal levels of respective pixels with a prescribed threshold value; a feed back circuit correcting the prescribed threshold value to be used for subsequent conversion of pixels, based on the result of comparison output from the comparator and the prescribed threshold value; and an allocating circuit for allocating gradation levels of the second image signal to each pixel, in accordance with the sections assigned by the assignment circuit and the result of comparison output from the comparator.
Preferably, the feed back circuit includes control means for controlling the feed back value in the feed back circuit.
Preferably, the feed back circuit includes a correction value memory dispersing the feed back value of the feed back circuit to a plurality of peripheral pixels to be converted subsequently, in accordance with weight set for each of the peripheral pixels.
Preferably, the image processing apparatus further includes a threshold value generating unit generating, as a prescribed threshold value, a value which changes for conversion of each pixel.
In accordance with a still further aspect of the present invention, the image processing apparatus converting a first image signal representing density level of each pixel in a prescribed number of gradations for each of a plurality of color components to a second image signal of smaller number of gradations than the prescribed number has a plurality of image processing units provided for respective color components, and each image processing unit includes a converter successively receiving as inputs the first image signals of pixels, comparing density level of each pixel with a prescribed threshold value and converting to the second image signals, and a feed back circuit correcting the prescribed threshold value to be used for subsequent conversion of pixels, based on the signal levels of the second image signals output from the converter and the threshold value.
Preferably, the feedback circuit includes control means for controlling a feed back value in a feed back circuit, and the feed back value differs in each color component.
Preferably, the image processing unit uses the prescribed threshold value different from color component to color component.